package com.xtc.nacos.controller;

import com.xtc.nacos.service.DemoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("discovery")
public class NacosDiscoveryController {

    @DubboReference
    private DemoService demoService;

    @GetMapping("/sayHello")
    private String sayHello(@RequestParam String info) {
        return demoService.sayHello(info);
    }
}
